import { FormProps, FormSchema } from '/@/components/Form';
import type { DynamicProps } from '/#/utils';
type Props = Partial<DynamicProps<FormProps>>;
const fromSchemas: FormSchema[] = [
  {
    field: 'id',
    component: 'Input',
    label: 'ID',
    show: false,
  },
  {
    field: 'category',
    component: 'Input',
    label: '项目',
    colProps: {
      span: 22,
    },
  },
  {
    field: 'name',
    component: 'Input',
    label: '代码',
    colProps: {
      span: 22,
    },
  },
  {
    field: 'value',
    component: 'Input',
    label: '参数值',
    colProps: {
      span: 22,
    },
    defaultValue: '',
  },
  {
    field: 'default_value',
    component: 'Input',
    label: '默认值',
    colProps: {
      span: 22,
    },
  },
  {
    field: 'comment',
    component: 'InputTextArea',
    label: '描述',
    colProps: {
      span: 22,
    },
    componentProps: {
      rows: 3,
    },
    required: true,
  },
  {
    field: 'create_time',
    component: 'Input',
    label: '创建时间',
    colProps: {
      span: 22,
    },
  },
  {
    field: 'update_time',
    component: 'Input',
    label: '修改时间',
    colProps: {
      span: 22,
    },
  },
];

export const fromConfig: Props = {
  labelWidth: 100,
  schemas: fromSchemas,
  showActionButtonGroup: false,
  actionColOptions: {
    span: 24,
  },
};
